#include "SpriteMgr.h"
#include <d3dx9.h>
#include "Device.h"

SpriteMgr::SpriteMgr(Device* const d3d9)
{
	D3DXCreateSprite(d3d9->GetDevice(),&pSprite);
}
SpriteMgr::SpriteMgr()
{ }
SpriteMgr::~SpriteMgr()
{ }
void SpriteMgr::vRender(LPDIRECT3DTEXTURE9 Tex,RECT *rt,long StartX, long StartY)
{
	pSprite->Draw(Tex,rt,&D3DXVECTOR3(0,0,0),&D3DXVECTOR3(StartX,StartY,0),D3DCOLOR_ARGB(255,255,255,255));
}
void SpriteMgr::vBegin()
{
	pSprite->Begin(D3DXSPRITE_ALPHABLEND);
}
void SpriteMgr::vEnd()
{
	pSprite->End();
}